@echo off
echo Starting all backend services...
echo.

REM Set Java environment
set JAVA_HOME=C:\Users\EDY\jdk-17.0.15_windows-x64_bin\jdk-17.0.15
set PATH=%JAVA_HOME%\bin;%PATH%

REM Start admin backend
echo Starting admin backend (port 8080)...
cd Spring-boot-vue
start "Admin Backend" cmd /c "java -jar target\Spring-boot-vue-0.0.1-SNAPSHOT.jar"
cd ..

REM Start user backend
echo Starting user backend (port 8081)...
cd spring-boot-1
start "User Backend" cmd /c "java -jar target\laundry-care-backend-1.0.0.jar"
cd ..

REM Start merchant backend
echo Starting merchant backend (port 8082)...
cd spring-boot2
start "Merchant Backend" cmd /c "java -jar target\spring-boot2-0.0.1-SNAPSHOT.jar"
cd ..

echo.
echo All backend services are starting...
echo ----------------------------------------
echo Admin backend:    http://localhost:8080
echo User backend:     http://localhost:8081
echo Merchant backend: http://localhost:8082
echo ----------------------------------------
echo.
pause
